package com.gexin.model.config;

import com.gexin.common.utils.SQLUtils;
import com.gexin.model.config.base.BaseBanner;

import java.util.List;

/**
 * 业务名称:  t_banner(轮播图) 
 */
@SuppressWarnings("serial")
public class Banner extends BaseBanner<Banner> {
	public static final Banner dao = new Banner();
	public static Integer STATEEFFECT = 1;
	public static Integer STATEEFAIL = 0;
	public List<Banner> getList(Integer state){
		SQLUtils sql = new SQLUtils("select * from t_banner where 1=1");
		if (state!=null){
			sql.whereEquals("state",state);
		}
		sql.append(" order by sort desc,createtime desc");
		return dao.find(sql.toString());
	}
}
